import request from '@/api/index.js'

const userService = {
  login: (res) => {
    return request.post('/login', res, {
      headers: {
        isToken: false,
      },
    })
  },
  register: (res) => {
    return request.post('/register', res, {
      headers: {
        isToken: false,
      },
    })
  },
  smsLogin: (res) => {
    return request.post('/smsLogin', res, {
      headers: {
        isToken: false,
      },
    })
  },
  getInfo: (res) => {
    return request.get('/getInfo', res)
  },
  logout: (res) => {
    return request.post('/logout', res)
  },
  captchaImage: (res) => {
    return request.get('/captchaImage', res)
  },
  captchaSms: (res) => {
    return request.get('/captchaSms', res)
  }
}

export default userService
